<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>文章管理-{$tpshop_config['shop_info_store_title']}</title>
    <meta name="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/tpshop.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/myaccount.css" />
    <script src="__STATIC__/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
    <style>
        .order-alone-li table tr{cursor: pointer}
        .order-alone-li table tr th{padding: 8px 15px;text-align: left;background: #666666;color:white;}
        .order-alone-li table tr:first-child td{background: #595959 !important;color: white}
        .order-alone-li table tr:nth-child(even) td{background:#e2e2e2 !important;}
        .order-alone-li table tr:hover td{background: #e23435 !important;color: white;}
    </style>ccc
</head>
<body class="bg-f5">
<include file="user/header"/>
<div class="home-index-middle">
    <div class="w1224">
        <div class="g-crumbs">
            <a href="{:U('Home/User/index')}">我的商城</a>
        </div>
        <div class="home-main">
            <include file="user/menu"/>
            <div class="ri-menu fr">
                <div class="order-list p">
                    <div class="ddlb-ayh">
                        <div class="ddlb-tit">
                            <h1>文章管理</h1>
                            <i class="u-sep"></i>
                            <a class="u-view-pre" href="{:U('Home/User/articleEdit')}">新建文章</a>
                        </div>
                        <empty name="order_list">
                            <div class="car-none-pl">
                                <i class="account-acco1"></i>您没有发布文章，快去发布文章吧~
                            </div>
                            <else/>
                            <div class="order-alone-li">
                                <table width="100%">
                                    <tr class="time_or">
                                        <th>ID</th>
                                        <th>标题</th>
                                        <th>发布时间</th>
                                        <th>状态</th>
                                    </tr>
                                    <volist name="order_list" id="list">
                                    <tr class="time_or">
                                        <td>{$list['article_id']}</td>
                                        <td>{$list['title']}</td>
                                        <td>{$list['add_time']|date='Y-m-d',###}</td>
                                        <td>
                                            <eq name="list['status']" value="1">
                                                <span>审核中</span>
                                            </eq>
                                            <eq name="list['status']" value="2">
                                                <span>已发布</span>
                                            </eq>
                                        </td>
                                    </tr>
                                    </volist>
                                </table>
                            </div>
                        </empty>
                        <div>
                            {$page}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<include file="public/footer" />
<script>
    function delfun(obj) {
        // 删除按钮
        layer.confirm('确认删除？', {
            btn: ['确定', '取消'] //按钮
        }, function () {
            $.ajax({
                type: 'post',
                url: $(obj).attr('data-url'),
                data: {act: 'del', article_id: $(obj).attr('data-id')},
                dataType: 'json',
                success: function (data) {
                    layer.closeAll();
                    if (data) {
                        $(obj).parent().parent().parent().remove();
                    } else {
                        layer.alert('删除失败', {icon: 2});  //alert('删除失败');
                    }
                }
            })
        }, function () {
            layer.closeAll();
        });
    }
</script>
</body>
</html>